package org.smartboot.socket.server;

import org.smartboot.socket.common.ChatMessage;
import org.smartboot.socket.common.ChatProtocal;
import org.smartboot.socket.transport.AioQuickServer;

import java.io.IOException;
/**
 * @author laoliu
 * @since 1.0
 */
public class ChatServer {
    public static void main(String[] args) throws IOException {
        int socketPort = 9999;
        AioQuickServer<ChatMessage> server = new AioQuickServer<ChatMessage>(socketPort, new ChatProtocal(), new ChatServerProcessor());
        // 关掉万恶的宣传广告 (笑~~)
        server.setBannerEnabled(false);
        //server.setThreadNum(100);
        // server.setReadBufferSize(8192).setWriteBuffer()
        server.start();
    }
}
